package com.nlp.visualization.service.weibo.main;

import com.nlp.visualization.service.weibo.IWeiboAnalyze;
import com.nlp.visualization.service.weibo.WeiboAnalyzeImpl;

import java.io.File;

public class Theme {
    public static void main(String[] args) {

        File temp_20171019 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/needParse/20171019_sw_temp.json");
        File temp_20180109 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/needParse/20180109_sw_temp.json");
        File temp_20171120 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/needParse/20171120_sw_temp.json");

        File sql_20171019 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/result/20171019_theme.sql");
        File sql_20180109 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/result/20180109_theme.sql");
        File sql_20171120 = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/result/20171120 _theme.sql");
        Theme t = new Theme();
//        t.saveThemeBySQL(temp_20171019, sql_20171019);
        File out_dir = new File("/Volumes/Seagate Backup Plus Drive/TeacherWang_weibo_data/result/per/");
        out_dir.mkdir();
        t.joinWeiboByCycle(temp_20171019, out_dir);


    }


    void saveThemeBySQL(File in, File out) {

        WeiboAnalyzeImpl weiboAnalyze = new WeiboAnalyzeImpl();
        weiboAnalyze.saveWeibo2SQL(in, out);
    }

    void joinWeiboByCycle(File in, File out) {
        IWeiboAnalyze weiboAnalyze = new WeiboAnalyzeImpl();
        weiboAnalyze.joinWeibo2Txt(in, out, 'd', 20);
    }
}
